package com.xp.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 基础控制器
 * 
 * @author xp
 * @since 2025-01-01
 */
@RestController
@RequestMapping("/api")
public class BaseController {

    /**
     * 健康检查接口
     * 
     * @return 系统状态信息
     */
    @GetMapping("/health")
    public Map<String, Object> health() {
        Map<String, Object> result = new HashMap<>();
        result.put("status", "UP");
        result.put("message", "AI博客系统运行正常");
        result.put("timestamp", System.currentTimeMillis());
        return result;
    }
}